import { get, post } from '../utils/http';
/* 登录模块 */
/**
 * 登录
 * @param data
 * @returns
 */
export const loginAPI = (data: any) => post('/auth/admin_login', data);

/**
 * 退出登录
 * @param data
 * @returns
 */
export const logoutAPI = () => get('auth/manager_logout', {});

interface Ireg {
  userName?: string;
  password?: string;
  nickName?: string;
  avatar?: string;
  address?: string;
  mobile?: string;
}

export const regAPI = (data: Ireg) => post('/auth/reg', data);
